home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
mmatch
/
memory.gbl
< prev
next >
Wrap
Text File
|
1995-09-06
|
12KB
|
244 lines
DefInt A-Z
Global CARD$(48)
Global A$(24)
Global UPBUTTON$, NUMFLAGS, MATCHES, GAMEBOARD
Global BUTTON1, BUTTON2, TRIES, PICKED
Global Const TRUE = -1, FALSE = 0
Type SCORERECORD
WINNER As String * 30
POINTS As Integer
DMY As String * 20
End Type
Global SCORE As SCORERECORD
'--------------------------------------------------------------------------
' These are the user-defined TYPE declarations for VBTOOLS.VBX
Type WinFlags
WF_80x87 As Integer ' True or false
WF_CPU As Integer ' 86,186,286,386,486
WF_MODE As Integer ' 1=Standard,2=386 enhanced
WF_FRAME As Integer ' 1=EMS large-frame, 2=EMS small-frame
End Type
'--------------------------------------------------------------------------
' These are the SUB and FUNCTION declarations for VBTOOLS.VBX
Declare Function Bload% Lib "vbtools.vbx" (ByVal Lin$, X As Any, ByVal Length&)
Declare Function Bsave% Lib "vbtools.vbx" (ByVal Lin$, X As Any, ByVal Length&)
Declare Function CVDMBF# Lib "vbtools.vbx" (Doub$)
Declare Function CVSMBF! Lib "vbtools.vbx" (Float$)
Declare Function CVI% Lib "vbtools.vbx" (ByVal Lin$)
Declare Function CVL& Lib "vbtools.vbx" (ByVal Lin$)
Declare Function CVS! Lib "vbtools.vbx" (ByVal Lin$)
Declare Function CVC@ Lib "vbtools.vbx" (ByVal Lin$)
Declare Function CVD# Lib "vbtools.vbx" (ByVal Lin$)
Declare Function MhBlue% Lib "vbtools.vbx" (ByVal xColor&)
Declare Function MhDefaultDrive% Lib "vbtools.vbx" ()
Declare Function MhDirectoryExists% Lib "vbtools.vbx" (A$)
Declare Function MhEcode% Lib "vbtools.vbx" ()
Declare Function MhExeName$ Lib "vbtools.vbx" (ByVal Hwnd As Integer)
Declare Function MHEXEPATH$ Lib "vbtools.vbx" (ByVal Hwnd As Integer)
Declare Function MhFileExists% Lib "vbtools.vbx" (A$)
Declare Function MhFileDateCompare% Lib "vbtools.vbx" (ByVal F1$, ByVal F2$)
Declare Function MhGreen% Lib "vbtools.vbx" (ByVal xColor&)
Declare Function MhKillFiles% Lib "vbtools.vbx" (ByVal Attr%, A$)
Declare Function MhRed% Lib "vbtools.vbx" (ByVal xColor&)
Declare Sub MhRgb Lib "vbtools.vbx" (ByVal xColor&, Red%, Green%, Blue%)
Declare Sub MhScrMono Lib "vbtools.vbx" (ByVal Lin$, ByVal Row%, ByVal Col%, ByVal Attr%)
Declare Function MhSetDefaultDrive% Lib "vbtools.vbx" (ByVal A%)
Declare Function MhSystemDir$ Lib "vbtools.vbx" ()
Declare Function MhWinDir$ Lib "vbtools.vbx" ()
Declare Sub MhWinFlags Lib "vbtools.vbx" (WindowsFlags As WinFlags)
Declare Function MhWinVersion% Lib "vbtools.vbx" (Major%, Minor%)
Declare Function MKI$ Lib "vbtools.vbx" (ByVal A%)
Declare Function MKL$ Lib "vbtools.vbx" (ByVal A&)
Declare Function MKD$ Lib "vbtools.vbx" (A#)
Declare Function MKDMBF$ Lib "vbtools.vbx" (Doubl#)
Declare Function MKS$ Lib "vbtools.vbx" (A!)
Declare Function MKSMBF$ Lib "vbtools.vbx" (Float!)
Declare Function MKC$ Lib "vbtools.vbx" (A@)
Declare Function Play% Lib "vbtools.vbx" (ByVal Lin$)
Declare Sub PlayStop Lib "vbtools.vbx" ()
'--------------------------------------------------------------------------
' These are the SUB and FUNCTION declarations for Windows KEYBOARD.DRV DLL
Declare Function GetKeyboardType% Lib "Keyboard.Drv" (ByVal nTypeFlag%)
'--------------------------------------------------------------------------
' These are the user-defined TYPE declarations for Windows GDI DLL
Type TextMetric ' Used with GetTextMetrics
TmHeight As Integer
TmAscent As Integer
TmDescent As Integer
TmInternalLeading As Integer
TmExternalLeading As Integer
TmAveCharWidth As Integer
TmMaxCharWidth As Integer
TmWeight As Integer
TmItalic As String * 1
TmUnderlined As String * 1
TmStruckOut As String * 1
TmFirstChar As String * 1
TmLastChar As String * 1
TmDefaultChar As String * 1
TmBreakChar As String * 1
TmPitchAndFamily As String * 1
TmCharSet As String * 1
tOverhang As Integer
TmDigitizedAspectX As Integer
TmDigitizedAspectY As Integer
End Type
'--------------------------------------------------------------------------
' These are the SUB and FUNCTION declarations for Windows GDI DLL
Declare Function GetTextExtent& Lib "Gdi" (ByVal hDC%, ByVal lpString$, ByVal nCount%)
Declare Function BitBlt% Lib "Gdi" (ByVal destDC%, ByVal X%, ByVal Y%, ByVal W%, ByVal H%, ByVal srcDC%, ByVal xSrc%, ByVal ySrc%, ByVal RasterOp&)
' BitBlt moves a bitmap from the
' source device to the destination
' device. See the CONST section for
' values for RasterOp&.
Declare Function GetTextMetrics% Lib "Gdi" (ByVal hDC%, A As TextMetric)
Declare Function GetTextCharacterExtra% Lib "Gdi" (ByVal hDC%)
Declare Function SetStretchBltMode% Lib "Gdi" (ByVal DestHdc%, ByVal StretchMode%)
' This function sets the stretching
' mode for the StretchBlt function.
' The stretching mode determines
' which scan lines and/or columns
' StretchBlt eliminates when
' contracting a bitmap.
' StretchMode% is one of:
Global Const BLACKONWHITE = 1
' AND in the eliminated lines.
' Preserves black pixels at
' the expense of white pixels
' by using the AND operator
' on the eliminated lines and
' those remaining.
Global Const WHITEONBLACK = 2
' OR in the eliminated lines.
' Preserves white pixels at
' the expense of black pixels
' by using the OR operator
' on the eliminated lines and
' those remaining.
Global Const COLORONCOLOR = 3
' Deletes the eliminated lines
' without preserving their
' information.
Declare Function SetTextCharacterExtra% Lib "Gdi" (ByVal hDC%, ByVal nCharExtra%)
Declare Function StretchBlt% Lib "Gdi" (ByVal destDC%, ByVal DestX%, ByVal DestY%, ByVal W%, ByVal H%, ByVal srcDC%, ByVal xSrc%, ByVal ySrc%, ByVal wSrc%, ByVal hSrc%, ByVal RasterOp&)
' StretchBlt moves a bitmap from a
' source rectangle to a destination
' rectangle, stretching or
' compressing the bitmap if
' necessary to fit the dimensions
' of the destination rectangle.
' Also see SetStretchBltMode.
' See the CONST section for
' values for RasterOp&.
'--------------------------------------------------------------------------
' These are the SUB and FUNCTION declarations for Windows KERNEL DLL
Declare Function GetModuleFileName% Lib "Kernel" (ByVal hModule%, ByVal FileName$, ByVal nSize%)
Declare Function GetPrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal Default$, ByVal ReturnedString$, ByVal nSize%, ByVal PFileName$)
Declare Function LoadLibrary% Lib "Kernel" (ByVal LibName$)
Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal AppName$, ByVal KeyName$, ByVal PString$, ByVal PFileName$)
'--------------------------------------------------------------------------
' These are the SUB and FUNCTION declarations for Windows USER DLL
Declare Sub CreateCaret Lib "User" (ByVal Hwnd%, ByVal hBiTmap%, ByVal nWidth%, ByVal nHeight%)
Declare Sub DestroyCaret Lib "User" ()
Declare Function EnableHardwareInput% Lib "User" (ByVal TrueOrFalse%)
Declare Function ExitWindows% Lib "User" (ByVal dwReserved&, ByVal wReturnCode%)
Declare Function FlashWindow% Lib "User" (ByVal Hwnd%, ByVal bInvert%)
Declare Function GetCaretBlinkTime% Lib "User" ()
Declare Function GetCurrentTime& Lib "User" ()
Declare Function GetDoubleClickTime% Lib "User" ()
Declare Function GetFocus% Lib "User" ()
Declare Function GetInputState% Lib "User" ()
Declare Function GetKeyState% Lib "User" (ByVal nVirtKey%)
Declare Function GetMenu% Lib "User" (ByVal Hwnd%)
Declare Function GetMenuItemID% Lib "User" (ByVal hMenu%, ByVal nPos%)
Declare Function GetSubMenu% Lib "User" (ByVal hMenu%, ByVal nPos%)
Declar